﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using KerriganDataContract.Person;
using System.ComponentModel;
using KerriganDataContract.Agency;

namespace KerriganDataContract.Customer
{
    [DataContract]
    public class CustomerDC : INotifyPropertyChanged
    {

        private DateTime? _dateCode;

        private Boolean _bsr;

        private Boolean _permisa;

        private Boolean _permisb;

        private PersonDC _person;

        private AgencyEmployeeDC _commercial;



        [DataMember]
        public Int32 IdCustomer { get;  set; }

        [DataMember]
        public DateTime? dateCode {
            get
            {
                return this._dateCode;
            }
            set
            {
                this._dateCode = value;
                OnPropertyChanged("dateCode");
            }
        }

        [DataMember]
        public Boolean bsr {
            get
            {
                return this._bsr;
            }
            set
            {
                this._bsr = value;
                OnPropertyChanged("bsr");
            }
        }

        [DataMember]
        public Boolean permisa
        {
            get
            {
                return this._permisa;
            }
            set
            {
                this._permisa = value;
                OnPropertyChanged("permisa");
            }
        }

        [DataMember]
        public Boolean permisb
        {
            get
            {
                return this._permisb;
            }
            set
            {
                this._permisb = value;
                OnPropertyChanged("permisb");
            }
        }

        [DataMember]
        public PersonDC Person {
            get
            {
                return this._person;
            }
            set
            {
                this._person = value;
                OnPropertyChanged("Person");
            }
        }

        [DataMember]
        public AgencyEmployeeDC Commercial 
        {
            get
            {
                return this._commercial;
            }
            set
            {
                this._commercial = value;
                OnPropertyChanged("Commercial");
            }
        }


        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this,new PropertyChangedEventArgs(property));
            }
        }
    }







}
